<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:c="http://java.sun.com/jsp/jstl/core">

<ui:composition>
	<!-- qualquer tag que estiver fora do composition vai ser deletada qdo o template for carregado -->
	<h:head>
		<title><ui:insert name="titulo">JSF</ui:insert></title>
	</h:head>
	<h:body>
		<h:form id="frmPrincipal">
			<!-- <p:growl id="growl" showDetail="true" /> -->

			<p:panel header="#{sessionScope.login.usuario.nome}"
				style="height:600px">
				<center>
					<ui:insert name="conteudo"></ui:insert>
					<!-- aqui vai o conteudo da pagina -->
				</center>

				
					<f:facet name="options">
						<p:menu>
							<p:submenu label="Opcoes">
								<ui:insert name="menuitem">
									<!-- esses menus aqui vao ser substituidos  -->
									<p:menuitem value="Cadastro" url="inicio.xhtml" />
									<p:menuitem value="Relatorio" url="relatorio.xhtml" />
								</ui:insert>
								<p:menuitem value="Logout" icon="ui-icon-close"
									actionListener="#{login.logout}" />
							</p:submenu>
						</p:menu>
					</f:facet>
			</p:panel>

		</h:form>
	</h:body>
</ui:composition>
</html>